/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var GameProxy = function(baseUri) {
    this.baseUri = baseUri;
}

GameProxy.prototype = (function() {
    return {
        submitWord: function(gameId, wordPoints, player) {
            return $.ajax({
                type: 'POST',
                url: this.baseUri + "/" + gameId + "/submitWord",
                data: "list=" + wordPoints + "&player=" + player
            });
        },
        getPoints: function(gameId, player) {
            return $.getJSON(this.baseUri + "/" + gameId + "/" + player);
        }
    }
}());